#include <stdlib.h>
#include <stdio.h>
#include "Functions.h"

int main(int argc, char **argv) {
    FileStruct *image = malloc(sizeof(FileStruct));
    Bmp_Image *bmp = malloc(sizeof(Bmp_Image));
	char *finalcode = NULL;
	

    ReadImage(argv[1], bmp);
    HuffmanTree(image, bmp);
	printf("Tamanho dos dados: %ld\n", strlen(finalcode));
	WriteFileCode(finalcode, argv[1], image, bmp); 

    return 0;
}
